<include file="Public/ADMIN/HTML/Admin_header/admin_first_head.html" />
<title>待审核项目{$Think.const.TITLE}</title>
<include file="Public/ADMIN/HTML/Admin_header/admin_css_and_js.html" />
<include file="Public/ADMIN/HTML/Admin_header/admin_title.html" />
<include file="Public/ADMIN/HTML/Admin_header/admin_middle_list.html" />
<include file="Public/ADMIN/HTML/Left_list/project_left_list.html" />
<!-- DataTables Example -->
<script>
	
    function projectDel(xid){ 
			var gradename = xid;
			address = "{$Think.const.DOMAIN_NAME}Admin/Project/projectDel/id/"+gradename; // 设置$.get调用路径
			var delTr = document.getElementById(xid);                                  // 获取动态的表格ID
			$.get(address,function(str){                                               // 方法不太明白，大概意思是获取$.get返回的值
				if(str==0){                                                            // 如果返回的时0的话就证明是对的
				ZENG.msgbox.show("删除成功！", 4, 1000);
				delTr.parentNode.removeChild(delTr);                                   // 删除该行
			}else{                                                                     // 其他情况都是原密码错误    
				ZENG.msgbox.show("删除失败！", 5, 2000);
			}
		    });	 
	}
	function projectCheck(xid,x){
		var delTr = document.getElementById(xid);
		if(x==1){
			address = "{$Think.const.DOMAIN_NAME}Admin/Project/projectExamine/id/"+xid+"/oid/1"; // 设置$.get调用路径
			$.get(address,function(str){
				if(str==1){
					ZENG.msgbox.show("操作成功！", 4, 1000);
		            delTr.parentNode.removeChild(delTr);                                   // 删除该行
				}else{
					ZENG.msgbox.show("操作失败！", 5, 1000);
				}
			});

		}else{
			address = "{$Think.const.DOMAIN_NAME}Admin/Project/projectExamine/id/"+xid+"/oid/2"; // 设置$.get调用路径
			$.get(address,function(str){
				if(str==1){
					ZENG.msgbox.show("操作成功！", 4, 1000);
		            delTr.parentNode.removeChild(delTr);                                   // 删除该行
				}else{
					ZENG.msgbox.show("操作失败！", 5, 1000);
				}
			});
		}
		
	}

</script>
<div class="row" style="height: 80%">
	<div class="col-lg-10" style="float: right">
		<div class="widget-container fluid-height clearfix">
			<div class="heading">
				<i class="icon-table"></i>待审核项目
			</div>
			<div class="widget-content padded clearfix">
				<table class="table table-bordered table-striped dataTable"
					id="datatable-editable">
					<thead>
						<th style="width: 8%; text-align: center">编号</th>
						<th style="width: 20%; text-align: center">项目名称</th>
						<th style="width: 9%; text-align: center;">负责人</th>
						<th style="width: 9%; text-align: center;">发布人</th>
						<th style="width: 14%; text-align: center;">添加时间</th>
						<th style="width: 9%; text-align: center">是否招标</th>
						<th style="width: 14%; text-align: center">审核</th>
						<th style="width: 12%; text-align: center">附件</th>
						<th style="width: 5%; text-align: center;">操作</th>
					</thead>
					<tbody>
						<assign name="number" value="1" />
						<volist name="check" id="vo">
						<tr id="{$vo.id}">
							<td style="text-align: center;">{$number++}</td>
							<td><a
								href="{$Think.const.DOMAIN_NAME}Home/Project/details/id/{$vo.id}"
								target="_bank">{$vo.name}</a></td>
							<td style="text-align: center;">{$vo.leader}</td>
							<td style="text-align: center;">{$vo.isuser}</td>
							<td style="text-align: center;">{$vo.adddate}</td>
							<td style="text-align: center;"><if
									condition="$vo.isbid eq '1'"> 招标</if> <if
									condition="$vo.isbid eq '0'"> 不招标</if></td>
							<td style="text-align: center;"><if
									condition="$vo.ischecked eq '0'"> <span
									class="label label-success"
									onclick="javascript:projectCheck({$vo.id},1)">通过</span></if> <if
									condition="$vo.ischecked eq '0'"> <a
									class="label label-warning" data-toggle="modal"
									href="#mail{$vo.id}">不通过</a> </if></td>
							<td style="text-align: center;"><a
								href="{$Think.const.RESOURCES}UPLOADS/attach/{$vo.attach}"
								target="_bank">{$vo.attach|substr=###,20,15}</a></td>
							<td style="text-align: center; width: 9%">
								<div class="action-buttons" style="margin-left: -14%">
									<a class="table-actions" href="javascript:void(0);"
										onclick="if(confirm('確定刪除么？')==0){history.go(0); return false;}else{javascript:projectDel({$vo.id})}"
										title="删除"><i class="icon-trash"></i></a>
								</div>
							</td>
						</tr>
						</volist>
					</tbody>
				</table>
				<volist name="check" id="vo">
				<form action="__SELF__/id/{$vo.id}" method="post">
					<div class="modal fade" id="mail{$vo.id}">
						<div class="modal-dialog">
							<div class="modal-content">
								<div class="modal-header">
									<button aria-hidden="true" class="close" data-dismiss="modal"
										type="button">&times;</button>
									<h4 class="modal-title">审核评语</h4>
								</div>
								<div class="modal-body">
									<input type="hidden" name="haoqingzaitianshuinengyuwozhengfeng"
										value="qingfengzaishoushuinengyijiantulong">
									<h4>发送邮件</h4>
									<h6>
										<font color="green">邮件将发到申报人邮箱</font>
									</h6>
									<div class="form-group">
										<div class="col-md-12">
											<textarea class="form-control" type="text" name="checkinfo"
												placeholder="待修改事项或不通过原因"></textarea>
										</div>
									</div>
								</div>
								<div class="modal-footer">
									<button class="btn btn-primary"
										onclick="javascript:projectCheck({$vo.id},2)" type="submit">确定</button>
									<button class="btn btn-default-outline" data-dismiss="modal"
										type="button">关闭</button>
								</div>
							</div>
						</div>
					</div>
				</form>
				</volist>
			</div>
		</div>
	</div>
</div>
<!-- end DataTables Example -->
</div>
</div>
</body>
</html>